import unittest

from common.common import readPremiumTable
from common.mysqlHelper import MysqlHelper
sqlHelper = MysqlHelper()


class MyTestCase(unittest.TestCase):
    def test_something(self):
        result = readPremiumTable("Premium_Interface.xlsx")
        for i in range(result.__len__()):
            pass
        premium = sqlHelper.queryBasicPremium(["AS01|A1|10|M|10", "AS01|A1|3|M|10"], 50000)
        self.assertEqual(premium, 41881.00, msg="保费计算有误")


if __name__ == '__main__':
    unittest.main()
